/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package maindatart.view;

/**
 *
 * @author Administrator
 */
public class MainFram extends javax.swing.JFrame {

    /**
     * Creates new form mdrt
     */
    public MainFram() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuItem1 = new javax.swing.JMenuItem();
        jLabel3 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenu2 = new javax.swing.JMenu();
        jMenu5 = new javax.swing.JMenu();
        jMenu3 = new javax.swing.JMenu();
        jMenu4 = new javax.swing.JMenu();

        jMenuItem1.setText("jMenuItem1");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel3.setText("主数据清洗工具v0.1  丁丁");

        jMenu1.setText("主数据注册");
        jMenu1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                showRegPanel(evt);
            }
        });
        jMenuBar1.add(jMenu1);

        jMenu2.setText("主数据管理");
        jMenu2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                showMainDataPanel(evt);
            }
        });
        jMenuBar1.add(jMenu2);

        jMenu5.setText("清洗算法设计");
        jMenu5.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                showAlgDesignPanel(evt);
            }
        });
        jMenuBar1.add(jMenu5);

        jMenu3.setText("清洗");
        jMenu3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                showRushPanel(evt);
            }
        });
        jMenuBar1.add(jMenu3);

        jMenu4.setText("清洗结果处理");
        jMenu4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                showResultPanel(evt);
            }
        });
        jMenuBar1.add(jMenu4);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(405, Short.MAX_VALUE)
                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(104, 104, 104))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(472, Short.MAX_VALUE)
                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(50, 50, 50))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void showMainDataPanel(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_showMainDataPanel
        // 显示主数据面板
         //jLabel3.setText("sss");
       // mdp.setVisible(true);
         this.getContentPane().setVisible(false);
         mdp.setVisible(true);
         mdp.repaint();
        this.setContentPane(mdp);
        
    }//GEN-LAST:event_showMainDataPanel

    private void showRushPanel(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_showRushPanel

        // 显示清洗面板
        // jLabel3.setText("sss");
        this.getContentPane().setVisible(false);
         rushPanle.setVisible(true);
         mdp.repaint();
        this.setContentPane(rushPanle);
    }//GEN-LAST:event_showRushPanel

    private void showRegPanel(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_showRegPanel
        // TODO add your handling code here:
         this.getContentPane().setVisible(false);
         rp.setVisible(true);
        this.setContentPane(rp);
    }//GEN-LAST:event_showRegPanel

    private void showResultPanel(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_showResultPanel
        // TODO add your handling code here:
         this.getContentPane().setVisible(false);
         rdp.setVisible(true);
        this.setContentPane(rdp);
    }//GEN-LAST:event_showResultPanel

    private void showAlgDesignPanel(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_showAlgDesignPanel
        // TODO add your handling code here:
         this.getContentPane().setVisible(false);
         adp.setVisible(true);
        this.setContentPane(adp);
    }//GEN-LAST:event_showAlgDesignPanel

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(MainFram.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(MainFram.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(MainFram.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(MainFram.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainFram().setVisible(true);
            }
        });
    }

    private MainDataPanel mdp = new MainDataPanel();
    private MainDataRegPanel rp = new MainDataRegPanel();
    private RushPanel rushPanle = new RushPanel();
    private ResultDellPanel rdp = new ResultDellPanel();
    private AlgDesignPanel adp = new AlgDesignPanel();
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel3;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu5;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    // End of variables declaration//GEN-END:variables
}
